//
//
//  Created by longma on 2018/7/31.
//  Copyright © 2018年 XLH. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSUInteger, MJThemeStyle) {
    MJThemeStyleDefault,
    MJThemeStyleTechnology,
    MJThemeStyleTCM,
};

typedef NS_ENUM(NSUInteger, MJLanguageStyle) {
    MJLanguageStyleEN,
    MJLanguageStyleZhHansCN,
    MJLanguageStyleZhHantCN,
    MJLanguageStyleZhHantTW,
    MJLanguageStyleRU,
    MJLanguageStyleID,
};
@interface HealthHelper : NSObject

+ (instancetype)shared;

@property (nonatomic, assign) MJThemeStyle mThemeStyle;

@property (nonatomic, strong) NSNumber *themeStyle;

@property (nonatomic, strong) NSMutableArray *homePatientList;

@property (nonatomic, strong) PatientModel *selectMemberPatientModel;

@property (nonatomic, strong) MJCommonModel *parmModel;

/// 是否获取更新版本
@property (nonatomic, assign) BOOL isGetAppUpgrade;

/// 设置主题
+ (void)setThemeMode:(NSString *)theme;

/// 获取主题文本
+ (NSString *)getThemeModeName:(MJThemeStyle)mThemeStyle;

/// app更新
+ (void)appUpgradeWithToast:(BOOL)isShowToast;

/// app检查更新
+ (void)checkUpdateBlock:(void(^)(NSDictionary *data))updateBlock;

/// 获取AreaCodes数组
+ (NSMutableArray *)getAreaCodesDataSource;

/// 获取AreaCodes keys数组
+ (NSArray *)getAreaCodesKeyArray;

/// 获取AreaCodes数组
+ (NSArray *)getHealthAreaCodesDataSource;

/// 获取AreaCodes原数据
+ (NSMutableArray *)getAreaCodesJsonDataSource;

/// 获取AreaCodes keys数组
+ (NSMutableArray *)getAreaCodesJsonKeyArray:(NSMutableArray *)array;

/// 根据区号获取国家名称
//+ (NSString *)getCountryNameWithCountryCode:(NSString *)countryCode;

/// 根据区号获取ISO
+ (NSDictionary *)getCountryWithCountryCode:(NSString *)countryCode;

/// 当前国家区号
+ (NSDictionary *)getCountryAreaCode;

/// 获取AreaCodes数组
+ (NSMutableArray *)getAreaCodesJsonArray;

/// 初始化Item Button
+ (UIButton *)initItemButton:(UIView *)superview;

/// 当前国家地区名称
+ (NSString *)getCountryAreaName;

/// 月份分组
+(NSMutableArray *)itemMonthGroupArray:(NSMutableArray *)dataSourceArray aClass:(Class)aClass;

/// 跳转检查页面
/// - Parameters:
///   - patientModel: patientModel
///   - viewController: viewController
+ (void)jumpDetectionViewControllerWith:(PatientModel *)patientModel viewController:(UIViewController *)viewController;

/// 跳转检查页面
/// - Parameters:
///   - patientModel: patientModel
///   - viewController: viewController
+ (void)jumpDetectionViewController:(PatientModel *)patientModel detectionItemType:(DetectionItemType)detectionItemType period:(NSString *)period viewController:(UIViewController *)viewController;

/// 总胆固醇等级
/// - Parameter grade: <#grade description#>
+ (UIColor *)getTCColorWithGradeStr:(NSString *)grade;

+ (NSInteger)getTCGradeInteger:(NSString *)grade;

/// 血糖等级
/// - Parameter grade: <#grade description#>
+ (UIColor *)getGluColorWithGradeStr:(NSString *)grade;

+ (NSInteger)getGluGradeInteger:(NSString *)grade;

/// 血红蛋白等级
/// - Parameter grade: <#grade description#>
+ (UIColor *)getHBColorWithGradeStr:(NSString *)grade;

+ (NSInteger)getHBGradeInteger:(NSString *)grade;

/// 检测标题
/// - Parameter detectionItemType: <#detectionItemType description#>
+ (NSString *)detectionTitle:(DetectionItemType)detectionItemType;

/// 跳转检测详情页面
/// - Parameters:
///   - detectionItemType: <#detectionItemType description#>
///   - model: <#model description#>
///   - viewController: <#viewController description#>
+ (void)jumpDetectionResultController:(DetectionItemType)detectionItemType model:(id)model viewController:(UIViewController *)viewController completion:(void (^)(void))completion;

/// 获取成员信息
/// - Parameter patientId: <#patientId description#>
+ (PatientModel *)getpatientModel:(NSString *)patientId;

/// 时区转换
/// - Parameter createDateTime: <#createDateTime description#>
+ (NSString *)timeZoneWithDateTime:(NSString *)createDateTime dateFormat:(NSString *)dateFormat;

+ (void)jumpMemberInfoViewController:(UIViewController *)viewController patientId:(NSString *)patientId;

/// 加密
+ (NSString *)aesEncryptString:(NSString *)string;

/// Hi Lo 更好字体
+ (void)updateHiLoWithLabel:(UILabel *)label;

/// 中断保存
+ (void)interruptionSaveAlertViewWithConfirmBlock:(void(^)(void))confirmBlock cancelBlock:(void(^)(void))cancelBlock;

/// 登录失效
+ (void)loginExpiredAlertViewWithConfirmBlock:(void(^)(void))confirmBlock cancelBlock:(void(^)(void))cancelBlock;

+ (NSString *)getCountryNameWithCountryName:(NSString *)countryName;

+ (NSString *)getCountryNameWithCountryISO:(NSString *)countryISO;

/// 根据语言获取图片
+ (UIImage *)mj_imageWithLocalizedNamed:(NSString *)name;

/// 滑块验证邮箱
+ (void)showCaptchaViewWithEmail:(NSString *)email completion:(void (^)(MJBaseModel *model))completion;

/// 滑块验证手机号码
+ (void)showCaptchaViewWithPhoneNumber:(NSString *)phoneNumber countryAreaCode:(NSDictionary *)countryAreaCode completion:(void (^)(MJBaseModel *model))completion;
@end
